package com.mezz.bones.im.common.message.body.in;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

/**
 * @Author: zhuang
 * @Date: 2024/12/19 14:12
 * @Description: TODO
 * @Version: 1.0
 **/

@Data
@ApiModel("单聊消息")
public class PrivateMessageRecordReq {

    @ApiModelProperty("用户ID")
    @NotBlank(message = "userId不能为空")
    private String userId;

    @ApiModelProperty(("对端用户ID"))
    @NotBlank(message = "peerId不能为空")
    private String peerId;

    @ApiModelProperty("消息KEY")
    private String msgKey;

    /**
     * 筛选数据小于当前游标
     */
    @ApiModelProperty("查询的消息序列号")
    private Long cursorId;

    @ApiModelProperty("查询模式 0查询历史数据 1查询新数据")
    @Range(min = 0, max = 1, message = "查询模式必须是 0查询历史数据 1查询新数据")
    private Integer fetchMode;

    @ApiModelProperty("拉取多少条消息")
    private Long fetchNum;

    @ApiModelProperty("消息内容类型错误，必须是 text、audio、video、custom 或 image")
    private String contentType;}
